import { IRMISessionEvent } from "../../../Engine/RMI/IRMISessionEvent";
import { Session } from "../../../Engine/RMI/Session";
import { Dispatcher } from "../../mvc/core/Dispatcher";
import { DataEvent } from "../events/DataEvent";
import { EventName } from "../mvc/EventName";
import { PHPSender } from "../../../extend/php/PHPSender";
import { SenderType } from "../../../extend/php/SenderType";
import { ParamsConst } from "../../common/global/ParamsConst";
import { BrowerManager } from "../../../com/gengine/manager/BrowerManager";
type int = number;
//class RMISessionEvent
    
    export  class RMISessionEvent implements IRMISessionEvent
    {
       

        public onAbandon(arg1: Session): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.SocketClose));
            PHPSender.sendToURLByPHP(SenderType.GameSocketClose, ParamsConst.instance.username);
            return;
        }

        /* internal  */closeHandler(arg1: int): void
        {
            if (ParamsConst.instance.actimUrl) 
            {
                BrowerManager.instance.getUrl(ParamsConst.instance.actimUrl);
            }
            return;
        }

        private /* var */alert: Object /* flash.display.Sprite */;
    }
